package com.duobab.springbootredisdemo.controller;

import com.duobab.springbootredisdemo.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;

import java.util.Set;

public abstract class AbstractController {
    @Autowired
    private RedisUtils redisUtils;

    public void loadData(Model model) {
        Set<String> keys = redisUtils.keys();
        model.addAttribute("data", keys);
    }
}
